[pull] master from php:master#518
Merged
pull[bot] merged 11 commits intoturkdevops:masterfrom Nov 6, 2025
Merged
Conversation
Strings loaded from the file cache can not have a CE cache, because their cache slot is invalid. Remove the IS_STR_CLASS_NAME_MAP_PTR flag from these strings. We can also avoid updating the str flags in SERIALIZE_STR(), since the same updates must also be done in UNSERIALIZE_STR(). This was already done for interned strings, but not for non-interned ones. Fixes GH-20329 Closes GH-20337
* PHP-8.3: Remove CE cache from non-interned file cache strings
* PHP-8.4: Remove CE cache from non-interned file cache strings
* PHP-8.5: Remove CE cache from non-interned file cache strings
This test frequently fails in CI, where it took 1.3s, including a repeat due to being marked as flaky. Bump this limit with a generous margin.
* PHP-8.1: [skip ci] Relax Zend/tests/concat_003.phpt
* PHP-8.2: [skip ci] Relax Zend/tests/concat_003.phpt
* PHP-8.3: [skip ci] Relax Zend/tests/concat_003.phpt
* PHP-8.4: [skip ci] Relax Zend/tests/concat_003.phpt
* PHP-8.5: [skip ci] Relax Zend/tests/concat_003.phpt
Packed arrays are likely common in this case, as with array_shift which
already has a similar optimization.
For the following benchmark:
```php
<?php
for ($i = 0; $i < 10000000; $i++) {
$a = [0, 1, 2, 3, 4, 5];
array_unshift($a, -3, -2, -1);
}
```
On an i7-4790:
```
Benchmark 1: ./sapi/cli/php x.php
Time (mean ± σ): 753.8 ms ± 23.8 ms [User: 749.8 ms, System: 2.1 ms]
Range (min … max): 734.3 ms … 818.6 ms 10 runs
Benchmark 2: ./sapi/cli/php_old x.php
Time (mean ± σ): 972.5 ms ± 5.0 ms [User: 968.8 ms, System: 1.4 ms]
Range (min … max): 967.8 ms … 984.3 ms 10 runs
Summary
./sapi/cli/php x.php ran
1.29 ± 0.04 times faster than ./sapi/cli/php_old x.php
```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )